import request from '../request'

async function addAdv(payload){
    return await request.post('/addAdv',payload)
}

async function getAdvList(keyword=''){
    return await request.get('/advList',{params:{keyword}})
}

async function getById(_id){
    return await request.get('/advList/'+_id)
}

async function editAdv(payload,_id){
    return await request.post('/addAdv',payload,{params:{_id,name:123}})
}

export default{
    addAdv,
    getAdvList,
    getById,
    editAdv
}